<template>
  <el-container>
    <el-aside width="350px">
      <el-menu
        style="height:100%;">
        <NavMenu :data="navArray"></NavMenu>
      </el-menu>
    </el-aside>
    <el-main>
      <h1>百度接口</h1>
      <h2>请求参数</h2>
      <code>function(){}</code>
      <el-table></el-table>
      <h2>应答参数</h2>
      <code>333</code>
      <el-table></el-table>
    </el-main>
  </el-container>
</template>

<style scoped>
  .el-container{
    height: 100%;
  }
</style>

<script>
import NavMenu from '@/components/NavMenu'
import { read } from '../api/directory'
export default {
  data() {
    return {
      navArray: [],
      document: {}
    }
  },
  components: {
    NavMenu
  },
  mounted() {
    this.init()
  },
  methods: {
    init() {
      let that = this
      let id = this.$route.query.id
      read(id).then(response => {
        const {data} = response
        that.navArray = data
      })
    },
    load(id) {

    }
  }
}
</script>
